home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / basic / apb17.zip / FINANC.BAS < prev    next >
BASIC Source File  |  1990-12-20  |  1KB  |  42 lines

  1.     ' Financial Functions
  2.     ' Created 11-3-1987 K. Murray
  3.     '
  4.  
  5.     ' Find the payments for borrowing an amount
  6.     ' with interest
  7. ' Interest#=Interest rate per period
  8. ' Period#=Period of payments
  9. ' Principal#=Amount of the load
  10. Def Pmt1#(Interest#,Period#,Principal#)
  11.   Pmt1#=Principal#*(Interest#/(1-(1/((1+Interest#)^Period#))))
  12. End Def
  13.  
  14.     ' Find the future value of a deposit with interest
  15.     ' compounded at any period
  16. ' Deposit#=Initial Deposit
  17. ' Interest#=Interest rate per period
  18. ' Period#=Period of deposit
  19. Def Fv2#(Deposit#,Interest#,Period#)
  20.     Fv2#=Deposit#*(1+Interest#)^Period#
  21. End Def
  22.  
  23.     ' Compute the present value with
  24.     ' future value, interest rate and period
  25. ' FutureV#=Future value required
  26. ' Interest#=Interest rate per period
  27. ' Period#=# of periods
  28. Def Pv2#(FutureV#,Interest#,Period#)
  29.     Pv2#=FutureV#*(1+Interest#)^-Period#
  30. End Def
  31.  
  32.     ' Compute the required interest
  33.     ' rate given the present value, future value
  34.     ' and period of time
  35. ' FutureV#=Future value
  36. ' PresentV#=Present value
  37. ' Period#=# of periods
  38. Def Rate1#(FutureV#,PresentV#,Period#)
  39.     Rate1#=(FutureV#^(1/Period#))/PresentV#^(1/Period#)-1
  40. End Def
  41.     
  42.